package com.mpsc.hystrix.provide.controller;

import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixProperty;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
public class UserInfoController {

    @RequestMapping("/find/user")
    @HystrixCommand(fallbackMethod = "timeOut",commandProperties = {
            @HystrixProperty(name = "execution.isolation.tread.timeoutInMilliseconds",value = "3000")
    })
    public String findUserInfo() {

        return null;
    }

    public String timeOut() {

        return null;
    }
}
